-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make v2_
mutation prefix configurable
#636
Conversation
8829dd6
to
14fd6eb
Compare
@@ -4429,5 +4429,6 @@ | |||
"varchar": "string" | |||
} | |||
}, | |||
"mutationsVersion": "v2" | |||
"mutationsVersion": "v2", | |||
"mutationsPrefix": "" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before we added this, all the Postgres tests passed as before, after this, we had to go fix lots of things. Which means it works, which is good.
@@ -51,6 +51,9 @@ pub struct ParsedConfiguration { | |||
/// Which version of the generated mutation procedures to include in the schema response | |||
#[serde(default)] | |||
pub mutations_version: Option<metadata::mutations::MutationsVersion>, | |||
/// Provide a custom prefix for generated mutation names. Defaults to mutations version. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new config. serde(default)
means old config that does not include this will get None
, so we make sure that keeps old behaviour intact.
v2_
mutation prefix configurable
What
Pulled from #635 into own PR.
We add
mutations_prefix: Option<String>
to v5 configuration. When leftnull
(for existing projects), we default tov2_mutation_name
, but it can be replaced withhorse_mutation_name
etc.Most people will just want to use it to remove the prefix though, and that is the default for new projects.
mutationsPrefix: ""
will get rid of the prefix altogether, which I assume most users would want.How